<?php


namespace app\api\controller;


use app\common\controller\Api;
/**
 * 招商引资
 */
class Inviteinvestment extends Api
{

    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];


    /**
     * 获取分页列表
     * @ApiMethod GET
     * @param string $mold 类型:hb=湖北招商政策,zj=浙江招商政策
     */
    public function getPageList(\app\common\model\InviteInvestmentModel $InviteInvestmentModel){
        $mold = $this->request->request('mold');
        if(empty($mold)){
            $this->error('请求参数错误');
        }
        $user_id = $this->auth->id;
        $page = $this->request->request('page');
        $limit = $this->request->request('limit');
        $data = $InviteInvestmentModel->getPageList($mold, $user_id, $page, $limit);
        $this->result($data['msg'], $data['data'], $data['code']);
    }


    /**
     * 获取详情
     */
    public function getDetail(\app\common\model\InviteInvestmentModel $InviteInvestmentModel){
        $id = $this->request->request('id');
        if(empty($id)){
            $this->error('请求参数错误');
        }
        $data = $InviteInvestmentModel->getDetail($id);
        $this->result($data['msg'], $data['data'], $data['code']);
    }

}